import java.util.*;

public class Test {
    public static void main(String[] args) {
        TreeMap<String,Integer> map = new TreeMap<>();
        LinkedList<Integer> values = (LinkedList<Integer>) map.values();

    }

    public static void main8(String[] args) {
        HashBuck2<String, Integer> stringIntegerHashBuck2 = new HashBuck2<>();
        stringIntegerHashBuck2.put("aaa",1);
        stringIntegerHashBuck2.put("bbb",2);
        stringIntegerHashBuck2.put("ccc",3);
        stringIntegerHashBuck2.put("ddd",4);
        stringIntegerHashBuck2.put("eee",5);
        stringIntegerHashBuck2.put("fff",6);
        System.out.println(stringIntegerHashBuck2.getval("ccc"));
    }
    public static void main3(String[] args) {
        HashBuck hashBuck = new HashBuck();
        hashBuck.put(1,1);
        hashBuck.put(2,2);
        hashBuck.put(3,3);
        hashBuck.put(4,4);
        hashBuck.put(5,5);
        hashBuck.put(11,11);
        hashBuck.put(7,7);
        hashBuck.put(14,14);
        hashBuck.put(21,21);

        System.out.println(hashBuck.get(14));
    }

    class Test1{
        int id;

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Test1 test1 = (Test1) o;
            return id == test1.id;
        }

        @Override
        public int hashCode() {
            return Objects.hash(id);
        }
    }

    public static void main12(String[] args) {
        Map<String, String> m = new TreeMap<>();
// put(key, value):插入key-value的键值对
// 如果key不存在，会将key-value的键值对插入到map中,返回null
        m.put("林冲", "豹子头");
        m.put("鲁智深", "花和尚");
        m.put("武松", "行者");
        m.put("宋江", "及时雨");
        Set<Map.Entry<String, String>> entries = m.entrySet();
        Collection<String> values = m.values();

    }
    public static void main1(String[] args) {
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        int[] arr = {5,12,3,2,11,15};
        for (int i = 0; i < arr.length; i++) {
            binarySearchTree.insert(arr[i]);
        }
        System.out.println(binarySearchTree.remove(5));
        System.out.println();

    }
}
